package com.example.springcustompropertiessample;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping
@RestController
public class UserController {
    Logger log = LoggerFactory.getLogger(UserController.class);
    @Autowired
    User user;
    @RequestMapping(value = {"user"},method = {RequestMethod.GET})
    public String user(){
        log.info("参数:"+user.getName());
        return user.getName();
    }
}
